3.1.90 \(\int \frac {(2-x-2 x^2+x^3) (d+e x+f x^2+g x^3+h x^4+i x^5)}{(4-5 x^2+x^4)^2} \, dx\)

Optimal. Leaf size=122 \[ \frac {d-2 e+4 f-8 g+16 h-32 i}{12 (x+2)}-\frac {1}{18} \log (1-x) (d+e+f+g+h+i)+\frac {1}{48} \log (2-x) (d+2 e+4 f+8 g+16 h+32 i)+\frac {1}{6} \log (x+1) (d-e+f-g+h-i)-\frac {1}{144} \log (x+2) (19 d-26 e+28 f-8 g-80 h+352 i)+i x \]

________________________________________________________________________________________

Rubi [A]  time = 0.31, antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 51, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.039, Rules used = {1586, 6742} \begin {gather*} \frac {d-2 e+4 f-8 g+16 h-32 i}{12 (x+2)}-\frac {1}{18} \log (1-x) (d+e+f+g+h+i)+\frac {1}{48} \log (2-x) (d+2 e+4 f+8 g+16 h+32 i)+\frac {1}{6} \log (x+1) (d-e+f-g+h-i)-\frac {1}{144} \log (x+2) (19 d-26 e+28 f-8 g-80 h+352 i)+i x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((2 - x - 2*x^2 + x^3)*(d + e*x + f*x^2 + g*x^3 + h*x^4 + i*x^5))/(4 - 5*x^2 + x^4)^2,x]

[Out]

i*x + (d - 2*e + 4*f - 8*g + 16*h - 32*i)/(12*(2 + x)) - ((d + e + f + g + h + i)*Log[1 - x])/18 + ((d + 2*e +
 4*f + 8*g + 16*h + 32*i)*Log[2 - x])/48 + ((d - e + f - g + h - i)*Log[1 + x])/6 - ((19*d - 26*e + 28*f - 8*g
 - 80*h + 352*i)*Log[2 + x])/144

Rule 1586

Int[(u_.)*(Px_)^(p_.)*(Qx_)^(q_.), x_Symbol] :> Int[u*PolynomialQuotient[Px, Qx, x]^p*Qx^(p + q), x] /; FreeQ[
q, x] && PolyQ[Px, x] && PolyQ[Qx, x] && EqQ[PolynomialRemainder[Px, Qx, x], 0] && IntegerQ[p] && LtQ[p*q, 0]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {align*} \int \frac {\left (2-x-2 x^2+x^3\right ) \left (d+e x+f x^2+g x^3+h x^4+90 x^5\right )}{\left (4-5 x^2+x^4\right )^2} \, dx &=\int \frac {d+e x+f x^2+g x^3+h x^4+90 x^5}{(2+x)^2 \left (2-x-2 x^2+x^3\right )} \, dx\\ &=\int \left (90+\frac {2880+d+2 e+4 f+8 g+16 h}{48 (-2+x)}+\frac {-90-d-e-f-g-h}{18 (-1+x)}+\frac {-90+d-e+f-g+h}{6 (1+x)}+\frac {2880-d+2 e-4 f+8 g-16 h}{12 (2+x)^2}+\frac {-31680-19 d+26 e-28 f+8 g+80 h}{144 (2+x)}\right ) \, dx\\ &=90 x-\frac {2880-d+2 e-4 f+8 g-16 h}{12 (2+x)}-\frac {1}{18} (90+d+e+f+g+h) \log (1-x)+\frac {1}{48} (2880+d+2 e+4 f+8 g+16 h) \log (2-x)-\frac {1}{6} (90-d+e-f+g-h) \log (1+x)-\frac {1}{144} (31680+19 d-26 e+28 f-8 g-80 h) \log (2+x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 118, normalized size = 0.97 \begin {gather*} \frac {1}{144} \left (\frac {12 (d-2 (e-2 f+4 g-8 h+16 i))}{x+2}-8 \log (1-x) (d+e+f+g+h+i)+3 \log (2-x) (d+2 e+4 (f+2 g+4 h+8 i))+24 \log (x+1) (d-e+f-g+h-i)+\log (x+2) (-19 d+26 e-28 f+8 g+80 h-352 i)+144 i x\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((2 - x - 2*x^2 + x^3)*(d + e*x + f*x^2 + g*x^3 + h*x^4 + i*x^5))/(4 - 5*x^2 + x^4)^2,x]

[Out]

(144*i*x + (12*(d - 2*(e - 2*f + 4*g - 8*h + 16*i)))/(2 + x) - 8*(d + e + f + g + h + i)*Log[1 - x] + 3*(d + 2
*e + 4*(f + 2*g + 4*h + 8*i))*Log[2 - x] + 24*(d - e + f - g + h - i)*Log[1 + x] + (-19*d + 26*e - 28*f + 8*g
+ 80*h - 352*i)*Log[2 + x])/144

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (2-x-2 x^2+x^3\right ) \left (d+e x+f x^2+g x^3+h x^4+i x^5\right )}{\left (4-5 x^2+x^4\right )^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((2 - x - 2*x^2 + x^3)*(d + e*x + f*x^2 + g*x^3 + h*x^4 + i*x^5))/(4 - 5*x^2 + x^4)^2,x]

[Out]

IntegrateAlgebraic[((2 - x - 2*x^2 + x^3)*(d + e*x + f*x^2 + g*x^3 + h*x^4 + i*x^5))/(4 - 5*x^2 + x^4)^2, x]

________________________________________________________________________________________

fricas [A]  time = 83.28, size = 200, normalized size = 1.64 \begin {gather*} \frac {144 \, i x^{2} + 288 \, i x - {\left ({\left (19 \, d - 26 \, e + 28 \, f - 8 \, g - 80 \, h + 352 \, i\right )} x + 38 \, d - 52 \, e + 56 \, f - 16 \, g - 160 \, h + 704 \, i\right )} \log \left (x + 2\right ) + 24 \, {\left ({\left (d - e + f - g + h - i\right )} x + 2 \, d - 2 \, e + 2 \, f - 2 \, g + 2 \, h - 2 \, i\right )} \log \left (x + 1\right ) - 8 \, {\left ({\left (d + e + f + g + h + i\right )} x + 2 \, d + 2 \, e + 2 \, f + 2 \, g + 2 \, h + 2 \, i\right )} \log \left (x - 1\right ) + 3 \, {\left ({\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h + 32 \, i\right )} x + 2 \, d + 4 \, e + 8 \, f + 16 \, g + 32 \, h + 64 \, i\right )} \log \left (x - 2\right ) + 12 \, d - 24 \, e + 48 \, f - 96 \, g + 192 \, h - 384 \, i}{144 \, {\left (x + 2\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^3-2*x^2-x+2)*(i*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="fricas")

[Out]

1/144*(144*i*x^2 + 288*i*x - ((19*d - 26*e + 28*f - 8*g - 80*h + 352*i)*x + 38*d - 52*e + 56*f - 16*g - 160*h
+ 704*i)*log(x + 2) + 24*((d - e + f - g + h - i)*x + 2*d - 2*e + 2*f - 2*g + 2*h - 2*i)*log(x + 1) - 8*((d +
e + f + g + h + i)*x + 2*d + 2*e + 2*f + 2*g + 2*h + 2*i)*log(x - 1) + 3*((d + 2*e + 4*f + 8*g + 16*h + 32*i)*
x + 2*d + 4*e + 8*f + 16*g + 32*h + 64*i)*log(x - 2) + 12*d - 24*e + 48*f - 96*g + 192*h - 384*i)/(x + 2)

________________________________________________________________________________________

giac [A]  time = 0.37, size = 117, normalized size = 0.96 \begin {gather*} i x - \frac {1}{144} \, {\left (19 \, d + 28 \, f - 8 \, g - 80 \, h + 352 \, i - 26 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) + \frac {1}{6} \, {\left (d + f - g + h - i - e\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{18} \, {\left (d + f + g + h + i + e\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac {1}{48} \, {\left (d + 4 \, f + 8 \, g + 16 \, h + 32 \, i + 2 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) + \frac {d + 4 \, f - 8 \, g + 16 \, h - 32 \, i - 2 \, e}{12 \, {\left (x + 2\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^3-2*x^2-x+2)*(i*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="giac")

[Out]

i*x - 1/144*(19*d + 28*f - 8*g - 80*h + 352*i - 26*e)*log(abs(x + 2)) + 1/6*(d + f - g + h - i - e)*log(abs(x
+ 1)) - 1/18*(d + f + g + h + i + e)*log(abs(x - 1)) + 1/48*(d + 4*f + 8*g + 16*h + 32*i + 2*e)*log(abs(x - 2)
) + 1/12*(d + 4*f - 8*g + 16*h - 32*i - 2*e)/(x + 2)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 221, normalized size = 1.81 \begin {gather*} -\frac {22 i \ln \left (x +2\right )}{9}-\frac {i \ln \left (x -1\right )}{18}-\frac {i \ln \left (x +1\right )}{6}+\frac {2 i \ln \left (x -2\right )}{3}+\frac {5 h \ln \left (x +2\right )}{9}-\frac {h \ln \left (x -1\right )}{18}+\frac {h \ln \left (x +1\right )}{6}+\frac {h \ln \left (x -2\right )}{3}-\frac {g \ln \left (x -1\right )}{18}+\frac {g \ln \left (x +2\right )}{18}+\frac {g \ln \left (x -2\right )}{6}-\frac {g \ln \left (x +1\right )}{6}-\frac {19 d \ln \left (x +2\right )}{144}+\frac {13 e \ln \left (x +2\right )}{72}-\frac {e \ln \left (x -1\right )}{18}-\frac {d \ln \left (x -1\right )}{18}-\frac {e \ln \left (x +1\right )}{6}+\frac {d \ln \left (x +1\right )}{6}+\frac {d \ln \left (x -2\right )}{48}+\frac {e \ln \left (x -2\right )}{24}+\frac {f \ln \left (x -2\right )}{12}+\frac {f \ln \left (x +1\right )}{6}-\frac {f \ln \left (x -1\right )}{18}-\frac {7 f \ln \left (x +2\right )}{36}+i x +\frac {f}{3 x +6}+\frac {d}{12 x +24}-\frac {8 i}{3 \left (x +2\right )}+\frac {4 h}{3 \left (x +2\right )}-\frac {2 g}{3 \left (x +2\right )}-\frac {e}{6 \left (x +2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^3-2*x^2-x+2)*(i*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4)^2,x)

[Out]

-22/9*i*ln(x+2)-1/18*i*ln(x-1)-1/6*i*ln(x+1)+2/3*i*ln(x-2)+5/9*h*ln(x+2)-1/18*h*ln(x-1)+1/6*h*ln(x+1)+1/3*h*ln
(x-2)-1/18*g*ln(x-1)+1/18*g*ln(x+2)+1/6*g*ln(x-2)-1/6*g*ln(x+1)-19/144*d*ln(x+2)+13/72*e*ln(x+2)-1/18*e*ln(x-1
)-1/18*d*ln(x-1)-1/6*e*ln(x+1)+1/6*d*ln(x+1)+1/48*d*ln(x-2)+1/24*e*ln(x-2)+1/12*f*ln(x-2)+1/6*f*ln(x+1)-1/18*f
*ln(x-1)-7/36*f*ln(x+2)+i*x-8/3/(x+2)*i+4/3/(x+2)*h-2/3/(x+2)*g+1/12/(x+2)*d-1/6/(x+2)*e+1/3/(x+2)*f

________________________________________________________________________________________

maxima [A]  time = 0.45, size = 108, normalized size = 0.89 \begin {gather*} i x - \frac {1}{144} \, {\left (19 \, d - 26 \, e + 28 \, f - 8 \, g - 80 \, h + 352 \, i\right )} \log \left (x + 2\right ) + \frac {1}{6} \, {\left (d - e + f - g + h - i\right )} \log \left (x + 1\right ) - \frac {1}{18} \, {\left (d + e + f + g + h + i\right )} \log \left (x - 1\right ) + \frac {1}{48} \, {\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h + 32 \, i\right )} \log \left (x - 2\right ) + \frac {d - 2 \, e + 4 \, f - 8 \, g + 16 \, h - 32 \, i}{12 \, {\left (x + 2\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^3-2*x^2-x+2)*(i*x^5+h*x^4+g*x^3+f*x^2+e*x+d)/(x^4-5*x^2+4)^2,x, algorithm="maxima")

[Out]

i*x - 1/144*(19*d - 26*e + 28*f - 8*g - 80*h + 352*i)*log(x + 2) + 1/6*(d - e + f - g + h - i)*log(x + 1) - 1/
18*(d + e + f + g + h + i)*log(x - 1) + 1/48*(d + 2*e + 4*f + 8*g + 16*h + 32*i)*log(x - 2) + 1/12*(d - 2*e +
4*f - 8*g + 16*h - 32*i)/(x + 2)

________________________________________________________________________________________

mupad [B]  time = 1.67, size = 127, normalized size = 1.04 \begin {gather*} i\,x+\frac {\frac {d}{12}-\frac {e}{6}+\frac {f}{3}-\frac {2\,g}{3}+\frac {4\,h}{3}-\frac {8\,i}{3}}{x+2}+\ln \left (x+1\right )\,\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}+\frac {h}{6}-\frac {i}{6}\right )+\ln \left (x-2\right )\,\left (\frac {d}{48}+\frac {e}{24}+\frac {f}{12}+\frac {g}{6}+\frac {h}{3}+\frac {2\,i}{3}\right )-\ln \left (x-1\right )\,\left (\frac {d}{18}+\frac {e}{18}+\frac {f}{18}+\frac {g}{18}+\frac {h}{18}+\frac {i}{18}\right )-\ln \left (x+2\right )\,\left (\frac {19\,d}{144}-\frac {13\,e}{72}+\frac {7\,f}{36}-\frac {g}{18}-\frac {5\,h}{9}+\frac {22\,i}{9}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-((x + 2*x^2 - x^3 - 2)*(d + e*x + f*x^2 + g*x^3 + h*x^4 + i*x^5))/(x^4 - 5*x^2 + 4)^2,x)

[Out]

i*x + (d/12 - e/6 + f/3 - (2*g)/3 + (4*h)/3 - (8*i)/3)/(x + 2) + log(x + 1)*(d/6 - e/6 + f/6 - g/6 + h/6 - i/6
) + log(x - 2)*(d/48 + e/24 + f/12 + g/6 + h/3 + (2*i)/3) - log(x - 1)*(d/18 + e/18 + f/18 + g/18 + h/18 + i/1
8) - log(x + 2)*((19*d)/144 - (13*e)/72 + (7*f)/36 - g/18 - (5*h)/9 + (22*i)/9)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**3-2*x**2-x+2)*(i*x**5+h*x**4+g*x**3+f*x**2+e*x+d)/(x**4-5*x**2+4)**2,x)

[Out]

Timed out

________________________________________________________________________________________